-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Guard for cookie deletion when name is empty #15074
[dotnet] Guard for cookie deletion when name is empty #15074
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
It will be nice to add tests. |
Added tests, ready to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and simple, looks good!
User description
Description
Empty cookie name should be invalid when deleting.
Motivation and Context
Contributes to #15044
Types of changes
Checklist
PR Type
Enhancement, Bug fix
Description
Added validation for empty or null cookie names in
DeleteCookieNamed
andGetCookieNamed
methods.Updated exception type to
ArgumentException
for invalid cookie names.Simplified dictionary initialization in
DeleteCookieNamed
method.Improved code consistency and error handling in cookie management methods.
Changes walkthrough 📝
CookieJar.cs
Enhance cookie management with validation and exceptions
dotnet/src/webdriver/CookieJar.cs
ArgumentException
for invalid names.DeleteCookieNamed
.GetCookieNamed
method.ICookieJar.cs
Update cookie interface documentation and validation
dotnet/src/webdriver/ICookieJar.cs
DeleteCookieNamed
documentation.